package com.xiaoniu.lib_keleim.spi;

import com.xiaoniu.lib_keleim.ConversationType;
import com.xiaoniu.lib_keleim.db.ConversationListCallBack;
import com.xiaoniu.lib_keleim.db.MessageCountCallBack;
import com.xiaoniu.lib_keleim.db.MessageListCallBack;
import com.xiaoniu.lib_keleim.pojo.vos.BaseMessage;
import com.xiaoniu.lib_keleim.pojo.vos.PreSendMessage;
import com.xiaoniu.lib_keleim.pojo.vos.UserInfoVO;
import com.xiaoniu.lib_keleim.utils.InterceptType;

import java.util.HashMap;

/**
 * 网络模块
 */
public interface INetworkModule {

    void connect(UserInfoVO userInfo);

    void disconnect();

    void joinRoom(String targetId);

    void quitRoom(String targetId);

    void joinUltraGroup(String targetId, String channelId);

    void quitUltraGroup(String targetId, String channelId);

    void insertMessage(BaseMessage message);

    void sendMessage(PreSendMessage message);

    void getMessages(ConversationType conversationType, String targetId, String channelId, MessageListCallBack callBack);

    void getConversations(ConversationType conversationType, String targetId, ConversationListCallBack callBack);

    void getConversations(ConversationType conversationType, String targetId, String channelId, ConversationListCallBack callBack);

    void getUnreadCount(ConversationType conversationType, String targetId, String channelId, MessageCountCallBack callBack);

    void addOnReceiveMessageListener(ReceiveMessageListener receiveMessageListener);

}
